

#pragma once

#include "zacdb.h"
#include "zdbmain.h"
#include "zdbents.h"

#pragma pack(push, 8)

#pragma warning( disable: 4275 4251 )

#ifdef CAMERADLLIMPEXP
#undef CAMERADLLIMPEXP
#endif

#ifdef UCCAMERA_EXPORTS
#define CAMERADLLIMPEXP __declspec( dllexport )
#else
#define CAMERADLLIMPEXP
#endif

class UcDbImpCamera;

class CAMERADLLIMPEXP UcDbCamera: public UcDbEntity
{

public:
    UcDbCamera ();
    virtual ~UcDbCamera();
    UCDB_DECLARE_MEMBERS(UcDbCamera);
    UcDbObjectId view() const;
    Ucad::ErrorStatus	setView(const UcDbObjectId viewId);
    virtual Ucad::ErrorStatus getGripPoints(UcDbGripDataPtrArray& grips,
                                            const double curViewUnitSize,
                                            const int gripSize,
                                            const UcGeVector3d& curViewDir,
                                            const int bitflags) const;

    virtual Ucad::ErrorStatus moveGripPointsAt(
        const UcDbVoidPtrArray& gripAppData,
        const UcGeVector3d& offset,
        const int bitflags);

    virtual Ucad::ErrorStatus	getStretchPoints(
        UcGePoint3dArray&  stretchPoints)
        const;
    virtual Ucad::ErrorStatus   moveStretchPointsAt(
        const UcDbIntArray& indices,
        const UcGeVector3d&     offset);

    virtual void		list() const;

    virtual Ucad::ErrorStatus transformBy(const UcGeMatrix3d& xform);

    virtual ZSoft::Boolean worldDraw(UcGiWorldDraw*	mode);
    virtual void viewportDraw(UcGiViewportDraw* mode);
    virtual ZSoft::UInt32 setAttributes(UcGiDrawableTraits* pTraits);
    virtual Ucad::ErrorStatus   subErase(ZSoft::Boolean erasing);
    virtual Ucad::ErrorStatus   subOpen(UcDb::OpenMode openMode);
    virtual Ucad::ErrorStatus   subClose();

    virtual Ucad::ErrorStatus	dwgInFields(UcDbDwgFiler* filer);
    virtual Ucad::ErrorStatus	dwgOutFields(UcDbDwgFiler* filer) const;

    virtual Ucad::ErrorStatus	dxfInFields(UcDbDxfFiler* filer);
    virtual Ucad::ErrorStatus	dxfOutFields(UcDbDxfFiler* filer) const;

    virtual Ucad::ErrorStatus deepClone(UcDbObject* pOwnerObject,
        UcDbObject*& pClonedObject,
        UcDbIdMapping& idMap,
        ZSoft::Boolean isPrimary
        = ZSoft::kTrue) const;

    virtual Ucad::ErrorStatus wblockClone(UcRxObject* pOwnerObject,
        UcDbObject*& pClonedObject,
        UcDbIdMapping& idMap,
        ZSoft::Boolean isPrimary
        = ZSoft::kTrue) const;

    virtual Ucad::ErrorStatus getClassID(CLSID* pClsid) const;

    virtual Ucad::ErrorStatus highlight(const UcDbFullSubentPath& subId = kNullSubent,
                                        const ZSoft::Boolean highlightAll = ZSoft::kFalse) const;
    virtual Ucad::ErrorStatus unhighlight(const UcDbFullSubentPath& subId = kNullSubent,
                                          const ZSoft::Boolean highlightAll = ZSoft::kFalse) const;

private:
    friend class UcDbImpCamera;
    UcDbImpCamera* pImp;
};

#pragma pack (pop)
